<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}"/>
    <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
</head>
<body>
<div class="place"><span>位置：</span>
    <ul class="placeul">
        <li>采购管理</li>
        <li>品牌管理</li>
        <li>基本内容</li>
    </ul>
</div>
<div class="rightinfo">
    <form th:action="@{/sys/area/list}" method="post" id="areaForm">
        <ul class="tools">
            <input type="hidden" name="pageNo" value="1" id="pageNo">
            <li> 省:
                <input type="text" name="pName" th:value="${pName}"/>
            </li>
            <li> 市:
                <input type="text" name="cName" th:value="${cName}"/>
            </li>
            <li class="subBut" onclick="goPage(1)"><img th:src="@{/images/t06.png}"/>查询</li>
            <li class="subBut" onclick="reset()"><img th:src="@{/images/t03.png}"/>重置</li>
        </ul>
        <table class="tablelist">
            <thead>
            <tr>
                <th>序号</th>
                <th>省编号</th>
                <th>省名称</th>
                <th>市编号</th>
                <th>市名称</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="q,var:${pc.list}">
                <td th:text="${(pc.pageNum-1)*pc.pageSize+var.count}">1</td>
                <td th:text="${q.pNumber}">110000</td>
                <td th:text="${q.pName}">北京市</td>
                <td th:value="${q.cNumber}">110100</td>
                <td th:text="${q.cName}">市辖区</td>
            </tr>
            </tbody>
        </table>
        <div class="pagin">
            <div class="message">
                共<i class="blue" th:text="${pc.total}">1256</i>条记录，当前显示第&nbsp;<i class="blue" th:text="${pc.pageNum}">2&nbsp;</i>页
            </div>
            <ul class="paginList">
                <li class="paginItem">
                    <a href="javascript:void(0);" th:onclick="goPage([[${pc.isFirstPage?1:pc.pageNum-1}]])">
                        <span th:class="${pc.isFirstPage?'pagepre':'pagenxt roate'}"></span>
                    </a>
                </li>
                <li th:each="page : ${pc.navigatepageNums}"
                    th:class="${page==pc.pageNum?'paginItem current':'paginItem'}">
                    <a href="javascript:void(0);" th:text="${page}" th:onclick="goPage([[${page}]])">1</a>
                </li>
                <li class="paginItem">
                    <a href="javascript:void(0);"
                       th:onclick="goPage([[${pc.isLastPage?pc.pages:pc.pageNum+1}]])">
                        <span th:class="${pc.isLastPage?'pagepre roate':'pagenxt'}"></span>
                    </a>
                </li>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');

    function goPage(num) {
        $("#pageNo").val(num);
        $("#areaForm").submit();
    }

    function reset() {
        $(".tools>li>input").val("");
    }
</script>
</body>
</html>
